﻿'========================================================================
'功能:變更申請MVPN-IT填寫
'作者:
'日期:
'========================================================================
Imports System.Data
Partial Class WebForm_SysParam_ChangeApplyArrpoveIT
    Inherits BasePage


    'Public Overrides Function SaveFormInfo() As Boolean
    '    ''
    '    Try
    '        Dim appDao As Telecom.DAO.ApplyDAO = New Telecom.DAO.ApplyDAO(dbName)
    '        appDao.UpdateMVPNChg(txtPnpCodeNew.Text, txtFormNo.Text)
    '        Return True
    '    Catch ex As Exception
    '        Return False
    '    End Try

    'End Function

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            hiUID.Value = ActualUID
            hidbName.Value = dbName
            txtFormNo.Text = Request.QueryString("FormNo")
            GetData()

        End If
    End Sub
    Private Sub GetData()
        Dim aDao As Telecom.DAO.ApplyDAO = New Telecom.DAO.ApplyDAO(hidbName.Value)
        Dim dt As DataTable = aDao.GetMVPNChgByFlowerFormNo(Request.QueryString("FormNo"))
        Dim dr As DataRow = dt.Rows(0)
        txtFormNo.Text = dr("Serial").ToString
        txtFiller.Text = dr("Filler").ToString
        txtFillerName.Text = dr("FillerName").ToString
        txtFillerExt.Text = dr("FillerExtNo").ToString
        txtApplicant.Text = dr("EmpNo").ToString
        txtApplyName.Text = dr("EmpName").ToString
        txtPhoneNo.Text = dr("UserPhone").ToString
        txtApplyExt.Text = dr("ExtNo").ToString
        Try
            txtApplyDate.Text = DateTime.Parse(dr("ApplyTime").ToString).ToString("yyyy/MM/dd HH:mm:ss")
        Catch ex As Exception
            txtApplyDate.Text = ""
        End Try

        txtMemo.Text = dr("Memo").ToString
        txtPnpCodeNew.Text = dr("NewPnpCode").ToString
        ddlModiItem.DataBind()
        ddlSite.DataBind()
        ddlModiItem.SelectedValue = dr("ModiItem").ToString
        ddlSite.SelectedValue = dr("Site").ToString
        txtSerial.Text = dr("ChangeSerial").ToString

        Dim dt1 As DataTable = aDao.GetChtMVPNBySerial(txtSerial.Text)
        Dim dr1 As DataRow = dt1.Rows(0)

        txtUserType.Text = dr1("UserType").ToString()
        txtMVPNType.Text = dr1("MVPNType").ToString()
        txtEmpNo.Text = dr1("EmpNo").ToString()
        txtEmpName.Text = dr1("EmpName").ToString()
        txtIDNO.Text = dr1("UserIDNo").ToString()
        Try
            txtApplyTime.Text = DateTime.Parse(dr1("ApplyTime").ToString).ToString("yyyy/MM/dd HH:mm:ss")

        Catch ex As Exception
            txtApplyTime.Text = "'"
        End Try

        txtStatus.Text = dr1("Status").ToString()
        txtPNPCode.Text = dr1("PnpCode").ToString()
        txtFirstPay.Text = dr1("FirstPay").ToString()

    End Sub











End Class
